package com.turing.pre.processor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import com.turing.common.response.ResponseVO;
import com.turing.common.util.CoordinateUtil;
import com.turing.pre.processor.domain.PreProcessorTask;
import com.turing.pre.processor.vo.in.FileTaskVo;
import org.springframework.web.bind.annotation.RequestParam;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.List;


/**
 * @Description $!{table.comment} 服务类接口
 * @Author lcy
 * @Date 2021-10-28
 */
public interface PreProcessorTaskService extends IService<PreProcessorTask> {

    PreProcessorTask getTaskByMainStatus(int status, String url, List<String> fileTypes);

    boolean updateStatusById(int id, int status);

    void buildTaskStatus(PreProcessorTask task, String fileType, int elec);

    PreProcessorTask getTaskByAnalysisStatus(int status, String url);

    void savePreTask( FileTaskVo fileTaskVo );

    void doWord2pdf(PreProcessorTask preProcessorTask);

    void doPdf2jpg(PreProcessorTask preProcessorTask);

    void doPdfSplit(PreProcessorTask preProcessorTask);

    void doElecAnalysis(PreProcessorTask preProcessorTask);

    void doJsonAssembling(PreProcessorTask preProcessorTask);

    int countPendingTasks();

    ResponseVO<FileTaskVo> getAndLockPreProcessTask( String domain );

    void doFailedProcess(PreProcessorTask preProcessorTask);

    void doPhoto2jpg(PreProcessorTask preProcessorTask);

    void doTxt2pdf(PreProcessorTask preProcessorTask);

}
